import requests
from common.mylog import logger
from testdata.josn_or_data import create_card_data


class CreateCard:
    def crerte_card(self,url,param=None,header=None,data=None,json = None):

        logger.debug(f'请求地址{url},请求头：{header},请求参数{param},{data},{json}')

        r = requests.post(url=url,headers=header,params=param,data=data,json=json)

        logger.debug(f"返回的状态码{r.status_code},返回的结果{r.text}")

        assert r.status_code == 200
        assert r.json()["message"] == "执行成功"
        return r

